package com.lagou.edu.servlet;

import com.lagou.edu.pojo.Request;
import com.lagou.edu.pojo.Response;

/**
 * @ClassName: Servlet
 * @Auther: Jerry
 * @Date: 2020/7/31 23:08
 * @Desctiption: Servlet接口
 * @Version: 1.0
 */
public interface Servlet {

    /**
     * 初始化
     * @throws Exception 异常
     */
    public void init() throws Exception;

    /**
     * 摧毁
     * @throws Exception 异常
     */
    public void destroy() throws Exception;

    /**
     * 真正执行的方法
     * @param request 请求
     * @param response 响应
     * @throws Exception 异常
     */
    public void service(Request request, Response response) throws Exception;
}
